from django.contrib import admin

from . import models


class CouponAdmin(admin.ModelAdmin):

    list_display = ['code', 'valid_from', 'valid_to', 'discount', 'active']
    list_filter = ['active', 'valid_from', 'valid_to']
    serach_fields = ['code']


admin.site.register(models.Coupon, CouponAdmin)
